package cn.zktr.Personnel.controllers.zhouxiong;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONArray;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;

import cn.zktr.Personnel.model.service.zhouxiong.NoimpService;

@Controller
public class WaiQinController {

	@Autowired
	private NoimpService noimp;

	@RequestMapping("zx/wai-qin")
	public void zhujiemian() {}
	
	@RequestMapping("WaiQin")
	@ResponseBody
	public Map<String,Object> banci(int page,int rows) {
		Map<String,Object> map = new HashMap<>();
		map.put("total",noimp.seleWaiQin().size());
		Page<Object> p=PageHelper.startPage(page,rows);
		JSONArray findAll=noimp.seleWaiQin();
		//页内容
		map.put("rows",findAll);
		return map;
	}
}
